﻿using System;

namespace Telex;

static class ArraySegmentExtension
{
    public static Memory<T> AsMemory<T>(this ref ArraySegment<T> seg)
    {
        return new Memory<T>(seg.Array, seg.Offset, seg.Count);
    }
}